
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <signal.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <netdb.h>
#include <semaphore.h>
#include <errno.h>
#include <event.h>
#include <pthread.h>

#ifndef _LINUX_H
#define _LINUX_H
//=========================
//		     Wrapper Datatype
//=========================
typedef pid_t				rp_pid_t;
typedef pthread_t 		rp_thread_t;
typedef pthread_mutex_t 	rp_mutex_t;
typedef pthread_cond_t 	rp_cond_t;
typedef sem_t			rp_sem_t;
typedef void * (*ThreadFunc)(void *arg);

#ifdef _PTHREAD
typedef pthread_rwlock_t	rp_rwlock_t;
#else
typedef struct rp_rwlock_t
{
       pthread_mutex_t mutex;
       pthread_cond_t cond_read;
	pthread_cond_t cond_write;
       unsigned int num_read; 
	unsigned int num_write;
       unsigned int wait_read; 
	unsigned int wait_write;
} rp_rwlock_t;
#endif	// _PTHREAD

#endif	// _LINUX_H

